# Contributor: j.r <j.r@jugendhacker.de>
# Maintainer: j.r <j.r@jugendhacker.de>
pkgname=py3-telegram
_pyname=python-telegram
pkgver=0.15.0
pkgrel=2
pkgdesc="Python client for the Telegram's tdlib"
url="https://github.com/alexander-akhmetov/python-telegram"
arch="noarch !s390x"
license="MIT"
depends="python3 telegram-tdlib>=1.7.9"
makedepends="py3-setuptools"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/${_pyname%"${_pyname#?}"}/$_pyname/$_pyname-$pkgver.tar.gz
	https://raw.githubusercontent.com/alexander-akhmetov/python-telegram/$pkgver/LICENSE
	0001-Use-system-tdlib.patch
	0002-Remove-binarys.patch"
builddir="$srcdir/$_pyname-$pkgver/"
options="!check"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 $srcdir/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
43b58439ac414f69787262eff3656227e89dec4eedfbb13c1fce56555605d9b747d20cb1e2b5850b8649615873a8f1d9ebdcb8d5a1a2f12adeeada5757b2bb5b  python-telegram-0.15.0.tar.gz
b038c7b0c6138ff6f215a45d0da25ac8e3b52e3849087e90f68d3ebe246fbcd17c1f78f2ee3c020bfc759334d35709a1ac28b71c74091912dbf165785a3f5895  LICENSE
7521f123e0d3719eb8db2a6c2b120377f1ee9dbd235ad92cc91ab5b5e4ce0884692721a4fc478c8058038d24b8cae8dd8a0e5eed8d568bc769bdc80b8f2e3327  0001-Use-system-tdlib.patch
8c24db516797f8ffa8695b31be6364087ed9e6cfb9fc49bc8f68fdcb259b88dcf786afa71d30848bad50c4a201ea8d09f28fb5b86da023404f7ef6c4d17d3447  0002-Remove-binarys.patch
"
